
*****************************************
***   For appendix: support for PDS   ***
*****************************************

est clear

local pds close_pds 

foreach var of varlist `pds' {
	
	display " "
	display " "
	display " "
	display "Table A9: `var'"
	
	quietly eststo: areg `var' instrument $controls if birthyear_control >= 1970 & birthyear_control <= 1997, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


local numbers "& (1) \\"
local pds " & \multicolumn{1}{c}{Close to PDS} \\  \midrule"
local gap ""


esttab est1 using "tables/pds_appendix.tex", b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) ///
nonumber posthead("`gap'" "`pds'") replace ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument)


*********************************************************
***   For appendix: breaking up participation index   ***
*********************************************************


local participate participate_index vote1 raise_issue_index

est clear

foreach var of varlist `participate' {
	
	display " "
	display " "
	display " "
	display "Table A11: `var'"
	
	quietly eststo: areg `var' instrument $controls if birthyear_control >= 1970 & birthyear_control <= 1997, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}

foreach var of varlist `participate' {
	
	display " "
	display " "
	display " "
	display "Table A11: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
}	

local numbers "& (1) & (2) & (3) & (4) & (5) & (6) \\"
local gov1 " & \multicolumn{1}{c}{Participate} &  \multicolumn{1}{c}{Vote} & \multicolumn{1}{c}{Raise issue} &  \multicolumn{1}{c}{Participate} &  \multicolumn{1}{c}{Vote} & \multicolumn{1}{c}{Raise issue} \\ \midrule"
local gap ""

esttab est1 est2 est3 est4 est5 est6 using "tables/participate_indx_breakdown.tex", replace b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`numbers'" "`gov1'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)


******************************************************************
***   For appendix: heterogeneous effects on personal wealth   ***
******************************************************************

local economic economic_index employed assets basic_necessities 

est clear

foreach var of varlist `economic' {
		
		
	display " "
	display " "
	display " "
	display "Table A12: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
	
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
}	


local numbers "& (1) & (2) & (3) & (4) \\"
local economic " & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Employed}  &  \multicolumn{1}{c}{Assets index}  &  \multicolumn{1}{c}{Basic necessities index} \\  \midrule"
local gap ""

esttab est1 est2 est3 est4 using "tables/econ_appendix.tex", b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) ///
nonumber posthead("`numbers'" "`economic'") replace ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)

